<template>
	<view class="list-shop">
		<view class="list clearfix" v-for="(item, index) in list" :key="index">
			<view @click="getquery(item)">
				<image class="fl" :src="item.portrait||''" />
				<view class="fl cont">
					<view class="clearfix top">
						<view class="title fl">{{item.name}}</view>
						<text class="follow fr" v-show="follow">关注</text>
					</view>
					<view class="score">
						<uni-rate style="width: 100%;margin-top: 10rpx;" active-color="#FCC800" max="5" is-fill="false" size="18" disabled="true" :value="item.score"></uni-rate>
					</view>
					<view class="intro">主营业务：
						<text class="businessName" v-for="(item1, index1) in item.businessNames" :key="index1+'index1'">{{item1}}</text>
						<text class="businessName" v-for="(item1, index1) in item.businessNameLists" :key="index1+'index1'">{{item1}}</text>
					</view>
					<view class="adds">地址：{{item.province||''}}{{item.city||''}}{{item.region||''}}{{item.address||''}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import uniRate from '@/components/uni-rate/uni-rate.vue'
export default {
	components: {
		uniRate
	},
	props: {
		id:'',
		list: {
			// 数据列表
			type: Array,
			default() {
				return [];
			}
		},
		follow:true
	},
	methods:{
		getquery(item) {
			uni.navigateTo({
				url: '/pages/details/details-shop?sid=' + item.id + '&id=' + this.id,
			})
		}
	}
};
</script>

<style scoped lang="scss">
.top {
	width: 100%;
	height: 45rpx;
	line-height: 45rpx;
}
.score{
	width: 100%;
	/* height: 50rpx;
	line-height: 50rpx; */
	margin: 16rpx 0;
}
.list {
	min-height: 230rpx;
	padding: 30rpx 0;
	border-bottom: 1rpx solid #dfdfdf;
}
.list image {
	width: 210rpx;
	height: 218rpx;
	border-radius: 10rpx;
	background-size: cover;
	background-position: center 0;
}
.list .cont {
	width: 460rpx;
	margin-left: 16rpx;
}
.list .cont .title {
	width: 100%;
	font-size: 32rpx;
	color: #333;
	overflow: hidden;
	text-overflow:ellipsis;
	white-space: nowrap;
	line-height: 45rpx;
	height: 45rpx;
	/* margin-bottom: 20rpx; */
}
.list .cont .follow{
	color: $uni-color1;
	font-size: 26rpx;
	line-height: 45rpx;
	
}
.list .cont .intro{
	width: 100%;
	font-size: 24rpx;
	color: #666;
	letter-spacing: 0.6rpx;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	margin: 6rpx 0;
}
.list .cont .adds{
	font-size: 24rpx;
	color: #999;
	letter-spacing: 0.6rpx;
	overflow: hidden;
	text-overflow:ellipsis;
	white-space: nowrap;
}
.businessName{
	margin-right: 6rpx;
}
</style>
